<div class="page-product">
    <div class="bhz-category-wrap">
        <div ng-include="'catalog/view/theme/bhz/pc/modules/includes/category.html'" ng-controller="CategoryCtrl"></div>
    </div>
    <div class="border-top"></div>
    <div class="product-page-wrap w">
        <div class="product-basic-info clearfix">
            <div class="image-wrap">
                <img class="thumb-img" ng-src="{{product.images[selection.currViewIndex]}}">
					<div class="p-icon-b lp">
						<img ng-if="product.show_new==1" ng-src="image/tag/new.png">
					</div>
					<div class="p-icon-b rp">
						<img ng-if="product.recommend==1" ng-src="image/tag/recommend.png">
						<img ng-if="product.clearance==1 && product.show_clearance==1" ng-src="image/tag/clearance.png">
						<img ng-if="product.promotion==1" ng-src="image/tag/promotion.png">
					</div>
                <div class="top-left-icon" ng-show="product.upc==1">
                    <img ng-src="catalog/view/theme/bhz/pc/images/628logo.png">
                </div>
                <div class="top-left-icon" ng-show="product.upc==2">
                    <img ng-src="catalog/view/theme/bhz/pc/images/miaoshaicon.png">
                </div>
                <div class="bottom-left-icon" ng-show="product.upc==1">
                    <div class="count-number">{{product.jan}}</div>
                </div>
                <div class="swiper-section">
                    <div class="swiper-container" id="productSlider">
                        <ul class="swiper-wrapper">
                            <li class="swiper-slide" ng-repeat="(key,image) in product.images track by $index" on-ng-repeat-end="initSwiper()" ng-mouseover="changeViewIndex(key)" ng-class="{'select':key == selection.currViewIndex}">
                                <img class="" ng-src="{{image}}">
                            </li>
                        </ul>
                    </div>
                    <div class="swiper-button-prev"></div>
                    <div class="swiper-button-next"></div>
                </div>
                <div class="additions clearfix">
                    <a class="D-ib Fl-l wishlist" href="javascript:void(0);" ng-click="addTowishlist();">
                        <i class="icon" ng-class="{'icon-like-on': product.is_in_wishlist,'icon-like-off':!product.is_in_wishlist}"></i>
                        <span>加入收藏夹</span>
                    </a>
                    <div class="D-ib share clearfix">
                        <div class="bdsharebuttonbox D-ib">
                            <span class="D-ib">分享 : </span>
                            <a href="#" class="icon tsina" data-cmd="tsina" title="分享到新浪微博"></a>
                            <a href="#" class="icon weixin" data-cmd="weixin" title="分享到微信"></a>
                            <a href="#" class="icon sqq" data-cmd="sqq" title="分享到QQ好友"></a>
                            <a href="#" class="icon qzone" data-cmd="qzone" title="分享到QQ空间"></a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="basic-info">
                <div class="name">
					<span ng-if="product.lack_status == 2">D-</span><span ng-if="product.lack_status == 3">I-</span>{{product.name}}
					<span ng-if="product.show_cart==2" style="color:red;">(正在备货中)</span>
					<p class="stock-big-tips" ng-if="product.lack_status == 2 || product.lack_status == 3">{{product.lack_reason}}</p>
				</div>
                <div class="zonghe">
                    <div class="price-wrap">
                        <strong>工厂价</strong>
                        <span class="price">{{product.special_formated}}</span>
                        <span class="price-old">{{product.price_formated}}</span>
                    </div>
                    <div ng-show="bhz_user.need_review==1" class="price-notice">该价格为零售价，登录加盟后可享受工厂供货价。</div>
                    <div class="minimum" ng-model="selection.batch"><strong>起批量</strong><span id="pro_batch">{{product.minimum}}</span> </div>
                    <div class="minimum"><strong>装箱数</strong>{{product.packing_no}} </div>
					<div class="product_code"><strong style="margin-right:8px;">商品编码</strong>{{product.options[0].option_value[0].product_code}}</div>
                    <div class="price-wrap">
                        <span class="sku"><strong>条形码</strong>{{product.sku}}</span>
                    </div>
                    <div class="price-wrap" ng-if="product.clearance==1|| product.lack_status == 3">
                        <span class="sku"><strong>库存</strong>{{product.clearqty}}</span>
                    </div>
                </div>
                <div class="options-wrap" ng-if="product.options && product.options.length>0">
                    <div class="option-item" ng-repeat="option in product.options">
                        <span class="option-title">请选择{{option.name}}</span>
                        <div class="option-value-list">
                            <span ng-repeat="optionValue in option.option_value" ng-click="selectOption(option,optionValue)" class="option-value-item" ng-class="{'select':option.selectOptionValue == optionValue.product_option_value_id}">{{optionValue.name}}</span>
                        </div>
                    </div>
                </div>
                <div class="shipping-wrap clearfix">
                    <div class="shipping-title">物流</div>
                    <div class="shipping-content">由 <strong>百货栈官方物流</strong> 从 <strong>江苏 无锡</strong>配送并提供售后服务</div>
                    <div class="notice"><strong>注意：</strong>订单金额满￥<span class="price">500</span>免费配送</div>
                </div>
                <div class="quantity-wrap clearfix">
                    <div class="quantity-title">购买量</div>
                    <div class="quantity-input-wrap clearfix">
                        <span class="reduce update-quantity" ng-click="updateQuantity('reduce',product)">-</span>
                        <input type="text" ng-model="selection.quantity" onkeyup="value=this.value.replace(/\D+/g,'')" />
                        <span class="add update-quantity" ng-click="updateQuantity('add',product)">+</span>
                    </div>
                </div>
                <div class="btns-wrap">
					<a href="javascript:void(0);" class="btn btn-buy" ng-click="batchBuy();">立即购买</a>
					<a href="javascript:void(0);" class="btn btn-add" ng-click="singleToCart();">加入进货单</a>
                </div>
				<div ng-if="product.is_single==0" class="btns-wrap">
					 非单卖商品!
				</div>
                <div class="paymethod-wrap clearfix">
                    <div class="paymethod-title">支付方式</div>
                    <div class="paymethod-content">支付宝 &nbsp;&nbsp; 网上银行 &nbsp;&nbsp; 微信</div>
                </div>
            </div>
            <div class="product-related" ng-if="product.related && product.related.data && product.related.data.length>0">
                <div class="related-title">看了还看
                    <a href="javascript:void(0);" class="related_refresh" ng-click="refresh()">
                        <span>猜你喜欢</span>
                    </a>
                </div>
                <div class="related-products-list">
                    <div class="product-item" ng-repeat="(key,productItem) in product.related.data" ng-if="key<3">
                        <a class="product-link" href="javascript:void(0);" ng-click="gotoProduct(productItem.product_id)">
                            <img class="product-image" src="{{productItem.thumb}}">
                            <div class="name auto-cut-word-line">{{productItem.name}}</div>
                            <div class="price-wrap" style="text-align: center;">
                                <span class="price">{{productItem.special}}</span>
                                <span class="price-old">{{productItem.price}}</span>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        
        <!--销售组合-->
        <div ng-if="product.product_type==2" class="product-details-info cleafix">
        	<div class="content">
            	<table class="group-table">
                <thead>
                    <tr>
						<th class="text-center">
							<input type="checkbox" checked onclick="$('input[name*=\'check-box\']').prop('checked', this.checked);" />
						</th>
                        <th class="text-left">组合包含商品</th>
                        <th width="15%" class="text-center">单价</th>
                        <th width="15%" class="text-center">套装数量</th>
						<th width="15%" class="text-center">需求数量</th>
                        <th width="25%" class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="product-item" ng-repeat="gp in product.group_products">
						<td class="text-center">
							<input class="check-box" type="checkbox" name="check-box" checked />
							<input type="hidden" name="gp_id" value="{{gp.id}}" />
							<input type="hidden" name="gp_is_single" value="{{gp.is_single}}" />
						</td>
                    	<td>
                        	<a class="product-link" href="javascript:void(0);" ng-click="gotoProduct(gp.id)">{{gp.name}}</a>
                        </td>
                        <td class="text-center">
                        	{{gp.special}}
                        </td>
                        <td class="text-center">
                        	{{gp.qty}}
                        </td>
						<td class="text-center">
                        	<input ng-if="gp.is_single==1" class="group-quantity" name="submit-quantity{{gp.id}}" type="text" onkeyup="value=this.value.replace(/\D+/g,'')" value="{{gp.qty}}">
                        </td>
                        <td class="text-center">
                        	<span ng-if="gp.is_single==1">
								<a style="text-decoration: underline;font-size:14px;color:#212121" href="javascript:void(0);" ng-click="fastAdd(gp)">加入进货单</a>
                            </span>
                            <span ng-if="gp.is_single==0" style="font-size:12px;text-align:center;color:gray;">
                                非单卖商品!
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
            </div>
        </div>
        <!--销售组合-->
        
        <div class="product-details-info cleafix">
            <div class="product-details-info-left">
                <div class="vendor-wrap clearfix" ng-if="product.vendor && product.vendor.vendor_id">
                    <div class="vendor-name auto-cut-word-two-line">{{product.vendor.vendor_name}}</div>
                    <img ng-src="{{product.vendor.vendor_image}}">
                    <a href="javascript:void(0);" ng-click="jump('vendor/'+product.vendor.vendor_id)">进入店铺></a>
                </div>
                <div class="product-related" ng-if="product.related && product.related.data && product.related.data.length>0">
                    <div class="related-title">看了又看</div>
                    <div class="related-products-list">
                        <div class="product-item" ng-repeat="(key,productItem) in product.related.data.slice().reverse()" ng-if="key<3">
                            <a class="product-link" href="javascript:void(0);" ng-click="gotoProduct(productItem.product_id)">
                                <img class="product-image" ng-src="{{productItem.thumb}}">
                                <div class="name auto-cut-word-line">{{productItem.name}}</div>
                                <div class="price-wrap">
                                    <span class="price">{{productItem.special}}</span>
                                    <span class="price-old">{{productItem.price}}</span>
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="product-details">
                <div class="desc-tab-header">
                    <a href="javascript:void(0);" ng-click="selection.secondTab = 1" class="desc-tab-title" ng-class="{'selected':selection.secondTab == 1}">商品介绍</a>
                    <a href="javascript:void(0);" ng-click="selection.secondTab = 2" class="desc-tab-title" ng-class="{'selected':selection.secondTab == 2}">规格参数</a>
                    <a href="javascript:void(0);" ng-click="selection.secondTab = 3" class="desc-tab-title" ng-class="{'selected':selection.secondTab == 3}">评价</a>
                    <a href="javascript:void(0);" ng-click="selection.secondTab = 4" class="desc-tab-title" ng-class="{'selected':selection.secondTab == 4}">包装售后</a>
                </div>
                <div class="desc-tab-content">
                    <div class="desc-tab-content-item desc" ng-show="selection.secondTab == 1">
                        <p ng-bind-html="product.description"></p>
                    </div>
                    <div class="desc-tab-content-item args" ng-show="selection.secondTab == 2">
                        <div class="recommon-price">
                            <div class="recommon-price-title">建议零售价</div>
                            <div class="recommon-price-content">{{product.price_formated}}</div>
                        </div>
                        <table class="args-table">
                            <tr>
                                <th colspan="2">主体</th>
                            </tr>
                            <tr ng-repeat="(key,argsItem) in product.attr_args">
                                <td class="td-title">{{argsItem.name}}</td>
                                <td class="td-content">{{argsItem.text}}</td>
                            </tr>
                        </table>
                    </div>
                    <div class="desc-tab-content-item reviews" ng-show="selection.secondTab == 3">
                        <div class="reviews-totals-list">
                            <div class="reviews-totals-item totals">
                                <div>全部评价</div>
                                <div>{{product.reviews.reviews_menu.reviews_total}}</div>
                            </div>
                            <div class="reviews-totals-item good">
                                <div>好评</div>
                                <div>{{product.reviews.reviews_menu.rating_best}}</div>
                            </div>
                            <div class="reviews-totals-item normal">
                                <div>中评</div>
                                <div>{{product.reviews.reviews_menu.rating_mid}}</div>
                            </div>
                            <div class="reviews-totals-item bad">
                                <div>差评</div>
                                <div>{{product.reviews.reviews_menu.rating_bad}}</div>
                            </div>
                        </div>
                        <div class="reviews-list">
                            <div class="reviews-item clearfix" ng-repeat="review in product.reviews.reviews">
                                <div class="review-header clearfix">
                                    <div class="author-wrap">
                                        <div class="author-img"><img ng-src="{{review.avatar}}"></div>
                                        <div class="author-name">{{review.author}}</div>
                                    </div>
                                </div>
                                <div class="review-item-content">
                                    <div class="review-date">{{review.date_added}}</div>
                                    <div class="review-rating">
                                        <i class="icon icon-star-fill" ng-if="review.rating > 0"></i>
                                        <i class="icon icon-star" ng-if="review.rating <= 0"></i>
                                        <i class="icon icon-star-fill" ng-if="review.rating > 1"></i>
                                        <i class="icon icon-star" ng-if="review.rating <= 1"></i>
                                        <i class="icon icon-star-fill" ng-if="review.rating > 2"></i>
                                        <i class="icon icon-star" ng-if="review.rating <= 2"></i>
                                        <i class="icon icon-star-fill" ng-if="review.rating > 3"></i>
                                        <i class="icon icon-star" ng-if="review.rating <= 3"></i>
                                        <i class="icon icon-star-fill" ng-if="review.rating > 4"></i>
                                        <i class="icon icon-star" ng-if="review.rating <= 4"></i>
                                    </div>
                                    <div class="review-content">{{review.text}}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="desc-tab-content-item after-sale" ng-show="selection.secondTab == 4">
                        <!-- {{product.attribute_groups[0].attribute[0].text}} -->
                        <div ng-include="'catalog/view/theme/bhz/m/modules/product/after_sales.html'"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
window._bd_share_config = {
    "common": {
        "bdSnsKey": {},
        "bdText": "百货栈有好货，快来看看吧！",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": "",
        "bdStyle": "0",
        "bdSize": "16"
    },
    "share": {}
};
with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860594.js?cdnversion=' + ~(-new Date() / 36e5)];
</script>
